package com.xinli.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xinli.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xinli.business.mapper.LfNoticeMapper;
import com.xinli.business.domain.LfNotice;
import com.xinli.business.service.ILfNoticeService;

/**
 * IM通知Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-11
 */
@Service
public class LfNoticeServiceImpl extends ServiceImpl<LfNoticeMapper,LfNotice>  implements ILfNoticeService
{
    @Autowired
    private LfNoticeMapper lfNoticeMapper;

    /**
     * 查询IM通知
     *
     * @param id IM通知主键
     * @return IM通知
     */
    @Override
    public LfNotice selectLfNoticeById(String id)
    {
        return lfNoticeMapper.selectLfNoticeById(id);
    }

    /**
     * 查询IM通知列表
     *
     * @param lfNotice IM通知
     * @return IM通知
     */
    @Override
    public List<LfNotice> selectLfNoticeList(LfNotice lfNotice)
    {
        return lfNoticeMapper.selectLfNoticeList(lfNotice);
    }

    /**
     * 新增IM通知
     *
     * @param lfNotice IM通知
     * @return 结果
     */
    @Override
    public int insertLfNotice(LfNotice lfNotice)
    {
                lfNotice.setCreateTime(DateUtils.getNowDate());
            return lfNoticeMapper.insertLfNotice(lfNotice);
    }

    /**
     * 修改IM通知
     *
     * @param lfNotice IM通知
     * @return 结果
     */
    @Override
    public int updateLfNotice(LfNotice lfNotice)
    {
                lfNotice.setUpdateTime(DateUtils.getNowDate());
        return lfNoticeMapper.updateLfNotice(lfNotice);
    }

    /**
     * 批量删除IM通知
     *
     * @param ids 需要删除的IM通知主键
     * @return 结果
     */
    @Override
    public int deleteLfNoticeByIds(String[] ids)
    {
        return lfNoticeMapper.deleteLfNoticeByIds(ids);
    }

    /**
     * 删除IM通知信息
     *
     * @param id IM通知主键
     * @return 结果
     */
    @Override
    public int deleteLfNoticeById(String id)
    {
        return lfNoticeMapper.deleteLfNoticeById(id);
    }

    @Override
    public List<LfNotice> selectLfNoticeMemberList(LfNotice lfNotice){
        return lfNoticeMapper.selectLfNoticeMemberList(lfNotice);
    }
}
